Skip to content

in_prometheus: extract the error log throttling into LogThrottle - #264

Merged
Watson1978 merged 1 commit into
fluent:masterfrom
kenhys:fix-log-throttle
Aug 27, 2026
Merged

in_prometheus: extract the error log throttling into LogThrottle#264
Watson1978 merged 1 commit into
fluent:masterfrom
kenhys:fix-log-throttle

Conversation

@kenhys

@kenhys kenhys commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Before: in_prometheus suppressed its repeated error log with a Hash and a
Mutex of its own, which filter/out_prometheus could not reach.

After: the same mechanism lives in LogThrottle, which in_prometheus uses.
No behaviour changes. in_prometheus_spec keeps only what the unit spec
cannot cover.

@kenhys
kenhys marked this pull request as draft August 26, 2026 07:09
@kenhys

kenhys commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

This PR should be rebased with #263

@kenhys
kenhys marked this pull request as ready for review August 27, 2026 02:11
@kenhys
kenhys requested a review from Watson1978 August 27, 2026 02:14
Comment thread lib/fluent/plugin/in_prometheus.rb
@kenhys

kenhys commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Now extracted isolated log_throttle.

Comment thread spec/fluent/plugin/in_prometheus_spec.rb
Before: in_prometheus suppressed its repeated error log with a Hash and a
Mutex of its own, which filter/out_prometheus could not reach.

After: the same mechanism lives in LogThrottle, which in_prometheus uses.
No behaviour changes. in_prometheus_spec keeps only what the unit spec
cannot cover.

Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@Watson1978
Watson1978 merged commit 32812c9 into fluent:master Aug 27, 2026
9 checks passed
@kenhys
kenhys deleted the fix-log-throttle branch August 27, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants